import Actions from './actions';
export interface IMainReducer {
  isReady: boolean;
  isLoading?: boolean;
  showMode: boolean;
  List: Detail[];
  type?: string; //类型 0-供应 1-需求（全部是为null）
  industriesId?: string; //行业id
  city?: string; //地区--市id
  keyWords?: string; //搜索内容
  page: number; //当前页
  size: number; //每页显示条数
  totalPage: number; //总页数
  filterData: any[];
  filterDropdownValue: any[];
  cityId: number; //城市信息
  regionId: number; //商圈信息
  sortType: number; //排序
  cat0Id: number; //一级类目ID
  cat1Id: number; //二级类目ID
}

export interface Detail {
  id: number;
}

export type ActionType = ReturnType<typeof Actions>;
export type IAllReducerProps = {
  main: IMainReducer;
  [name: string]: any;
};

export type IProps = IAllReducerProps & ActionType;

//自定义
export type IInfoProps = {};
export type IInfoState = {
  subData: []; //菜单数据
  menu: []; //顶部横条数据
  showPage: -1; //菜单页面显示/隐藏动画控制
  pageState: []; //页面的状态
  activeMenuArr: []; //UI状态
  shadowActiveMenuArr: []; //记录选中
  defaultActive: [];
  triangleDeg: []; //小三角形的翻转动画控制
  isShowMask: false; //遮罩层显示/隐藏动画控制
  maskVisibility: false; //遮罩层显示/隐藏状态
  //滚动区域定位
  firstScrollInto: number;
  secondScrollInto: number;
  componentTop: number; //组件top
  isReadNewSelect: false;
  filterData: [];
  defaultSelected: [];
};

export type IPageProps = {};
export type IPageState = {
  navBarHeight: number;
  windowHeight: number;
  refresherTriggered: boolean;
};
